# coding=utf-8

"""
uv add ruamel.yaml
uv add pyyaml
uv add modelscope
"""

import yaml

# 读取 yaml 文件内容
def read_yaml(file_path):
    """
    使用方法:
    data = read_yaml("model_list.yaml")
    print(data)
    :param file_path:
    :return:
    """
    with open(file_path, "r") as f:
        return list(yaml.safe_load_all(f.read()))

if __name__ == "__main__":
    data = read_yaml("model_list.yaml")
    print(data)
    # 模型下载
    from modelscope import snapshot_download
    # model_dir = snapshot_download(model_id='Qwen/Qwen3-Embedding-0.6B-GGUF', allow_patterns=["Qwen3-Embedding-0.6B-Q8_0.gguf"], local_dir="./llm_gguf/")
    # model_dir = snapshot_download(model_id='dengcao/Qwen3-Reranker-0.6B-GGUF', allow_patterns=["Qwen3-Reranker-0.6B-q8_0.gguf"], local_dir="./llm_gguf/")
    # 生成 model_files
    pass
